package cn.itsource.basic.util;

import lombok.Data;

@Data
public class AjaxResult {
    private Object resultObj;
    private Boolean success = true;
    private String messsage = "操作成功";

    public static AjaxResult me(){

        return new AjaxResult();
    }

    /*链式编程*/
    public AjaxResult setSuccess(Boolean success) {
        this.success = success;
        return this;
    }

    public AjaxResult setResultObj(Object obj) {
        this.resultObj = obj;
        return this;
    }

    public AjaxResult setMesssage(String messsage) {
        this.messsage = messsage;
        return this;
    }
}
